﻿using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine; 

namespace QFramework
{

	public class MainControl: Entity
	{
		public MainControl() : base()
		{

		}

		public MainControl(GameObject m_Obj) : base(m_Obj)
		{

		}

		protected override void InitState()
		{			
			//**
			State m_State= new State(self);
			m_State.AddTransition("isKey","State1");
			AddState(m_State);
						
			//**
			State1 m_State1= new State1(self);
			m_State1.AddTransition("isKey","State2");
			AddState(m_State1);
						
			//**
			State2 m_State2= new State2(self);
			AddState(m_State2);
			//**
		}

		public static MainControl Get(GameObject obj)
		{
			return new MainControl(obj);
		}

		protected override void OnDestroy()
		{

		}

	}
}